package com.tianyi.sfzy1.service;

import com.tianyi.sfzy1.mapper.MemberpointsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MemberpointsService {
    @Autowired
    private MemberpointsMapper memberpointsMapper;
//    插入积分
    public int insertPointsByMemberId(int memberId, int points) {
        return memberpointsMapper.insertPointsByMemberId(memberId,points);
    }

//    根据会员编号修改积分
    public int updatePointsByMemberId(int memberId, int points) {
        return memberpointsMapper.updatePointsByMemberId(memberId,points);
    }

// 根据会员编号删除积分
    public int deletePointsByMemberId(int memberId) {
        return memberpointsMapper.deletePointsByMemberId(memberId);
    }

//根据会员编号删除积分(批量删除)
    public int deletePointsByIds(List<Integer> memberId) {
        return memberpointsMapper.deletePointsByIds(memberId);
    }
}
